package com.pkk.penguin.test.jdk8;

import com.pkk.components.encryption.factory.JasyptEncryFactory;

/**
 * @description: jdk的1.8版本的流的操作
 * @author: peikunkun
 * @create: 2019-10-08 11:45
 **/
public class Jdk8StreamHandle {

  /**
   *
   * @param args
   */
  public static void main(String[] args) {
    String salt = "kunzaikj521";
    String source = "123456";
    JasyptEncryFactory jasyptEncryFactory = new JasyptEncryFactory();
    jasyptEncryFactory.readme();
    jasyptEncryFactory.getInstance(salt);
    final String encode = jasyptEncryFactory.encode(source);
    final String decode = jasyptEncryFactory.decode(encode);
    System.out.println("加密数据:" + source + "->" + encode + "->" + decode);
  }
}
